// 顾客---》服务员——————》
import axios from "axios"
export let setAge = ()=>{
    return {
        type:"zs_setage",
        payload:25
      }
}
export let setAge1 = ()=>{
    return {
        type:"lisi_setage",
        payload111:25
      }
}
export let setAge2 = ()=>{
    return {
        type:"setage",
        payload111:25
      }
}

export let setAge3 = ()=>{
    return {
        type:"setage",
        payload111:25
      }
}
export let setAddress =()=>{
    return {
      type:"setAddress",
      payload:"北京市海淀区"
    }
}
export let getcarlist = ()=>{  // 同步的返回一个对象，异步返回一个函数
  return (dispatch)=>{
    axios.get("https://baojia.chelun.com/v2-car-getMasterBrandList.html").then(res=>{
        dispatch({
          type:"getcarlist",
          payload:res.data.data
        })
    })
  }
}
